body {
  --bg-color: #f4f4f4;
  --fg-color: #3c3c43;
  --header-border-color: lightgray;
  --color-secondary: #3c4553;
  counter-reset: subTitle;

  &.has-dark-bg {
    --bg-color: rgb(27, 27, 31);
    --fg-color: #dfdfd6;
    --header-border-color: black;
    --color-secondary: rgb(172, 191, 175);
  }

  @include breakpoint(large) {
    font-size: 18px;
  }
}

ul {
  margin: 0;
  list-style: none;

  li {
    padding: 0;
  }
}

.sub-title {
  margin-bottom: 1em;

  &.has-number {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;

    .is-centered & {
      justify-content: center;
    }

    .text {
      order: 3;
    }

    &:before {
      counter-increment: subTitle;
      content: '0' counter(subTitle);
    }

    &:after {
      width: 40px;
      padding-top: 1px;
      border-bottom: 1px solid $secondary-color;
      content: '';
      margin-left: 10px;
      margin-right: 20px;
      order: 2;
    }
  }
}

.title-1 {
  font-size: 31px;
  line-height: 1.16;
  font-weight: $global-weight-middle;
  margin-bottom: 0.7em;

  @include breakpoint(large) {
    font-size: 35px;
  }

  @include breakpoint(xxlarge) {
    font-size: 52px;
  }

  &.green {
    font-size: 70px;

    background: linear-gradient( -45deg, $luigi-green 30%, $body-font-color);
    background-clip: text;
    line-height: 94px;
    display: inline;
    color: transparent;

    img {
      display: none;
      width: 124px;
      margin-right: 19px;
      margin-bottom: 19px;
    }
  }
}

.title-2 {
  font-size: 24px;
  font-weight: $global-weight-middle;
  line-height: 1.25;
  margin-bottom: 1em;

  &.has-big-margin {
    margin-bottom: 3em;
  }

  @include breakpoint(large) {
    font-size: 30px;
  }

  @include breakpoint(xxlarge) {
    font-size: 34px;
  }
}

.title-3 {
  font-size: 24px;
  font-weight: $global-weight-middle;
  line-height: 1.58;
  margin-bottom: 0.5em;

  @include breakpoint(large) {
    font-size: 26px;
  }

  @include breakpoint(xxlarge) {
    font-size: 28px;
    line-height: 1.36;
  }
}

section,
.row {
  &.is-centered {
    text-align: center;
  }
}


.btn-primary,
.btn-secondary {
  display: inline-block;
  padding: 16px 32px;
  border: 2px solid $primary-color;
  border-radius: 8px;
  box-shadow: 0 8px 24px -17px #000101;
  background-color: $primary-color;
  font-size: 14px;
  font-weight: $global-weight-middle;
  font-family: $body-font-family;
  color: $button-color;
  cursor: pointer;
  transition: all 0.2s ease;

  &:hover,
  &:active,
  &:focus {
    background-color: $white;
    color: $button-color;
  }

  @include breakpoint(large) {
    font-size: 15px;
  }
}

.btn-secondary {
  background-color: white;
  border-color: white;

  &:hover,
  &:active,
  &:focus {
    border-color: $primary-color;
  }
}


a {
  transition: color 0.2s ease;
}

p {
  margin-bottom: 2em;
}

.list-type-1 {

  font-size: 15px;
  line-height: 1.2em;
  font-weight: $global-weight-middle;


  li {
    margin-bottom: 15px;

    a {
      display: inline-block;
      position: relative;
      color: $body-font-color;
      padding-right: 25px;

      &:after {
        position: absolute;
        top: 2px;
        right: 0;
        content: '';
        width: 6px;
        height: 6px;
        border-radius: 50%;
        width: 16px;
        height: 16px;
        background: url('../img/link-arrow.svg') no-repeat 50% 50%;
        background-size: auto;
      }

      &:hover {
        color: $primary-color;
      }
    }
  }
}

.main-content {
  >  .s-stage {
    padding-top: 30px;
    padding-bottom: 50px;
    color: $body-font-color;

    > .row {
      align-items: center;
    }

    .content {
      @include breakpoint(medium down) {
        margin-bottom: 50px;
      }

      @include breakpoint(large) {
        height: 350px;
        padding-top: 30px;

        a {
          margin-right: 10px;
        }
      }

      @include breakpoint(xxlarge) {
        height: 650px;
      }
    }

    .sub-title {
      font-family: $extra-font-family;
      font-weight: 500;

      @include breakpoint(xxlarge) {
        font-size: 20px;
      }
    }

    .image {
      background-image: url('../img/running_app_2x.png');
      background-position: 50% 0;
      background-repeat: no-repeat;
      background-size: cover;

      .play-button {
        display: block;
        width: 88px;
        height: 88px;
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%,-50%);
        background: rgba($powder-blue,0.51) url('../img/play_icon.svg') 60% 50% no-repeat;
        background-size: 22px 28px;
        border-radius: 50%;
        border: 8px solid rgba($ice-blue,0.46);
        background-clip: padding-box;
      }

      @include breakpoint(medium down) {
        padding-top: 52%;
        position: relative;
      }

      @include breakpoint(large) {
        background: none;
      }
    }

    @include breakpoint(large) {
      position: relative;
      overflow: hidden;

      padding-top: 55px;
      padding-bottom: 60px;
      padding-left: 80px;

      > .row {
        position: relative;

        &:before {
          position: absolute;
          display: block;
          height: 50%;
          width: 50%;
          top: 80px;
          left: 60%!important;
          content: '';
          background-image: linear-gradient(-45deg, $luigi-green 50%, $luigi-green 0);
          background-position: 0 0;
          background-repeat: no-repeat;
          background-size: auto 100%;
          filter: blur(68px);
        }

        &:after {
          position: absolute;
          display: block;
          height: 78%;
          width: 100%;
          top: 36px;
          left: 50%;
          content: '';
          background-image: url('../img/running_app_2x.png');
          background-position: 0 0;
          background-repeat: no-repeat;
          background-size: auto 100%;
        }
      }
    }

    @include breakpoint(large down) {
      > .row {
        &::before {
          background-size: 30vw 100%;
        }
      }
    }

    @include breakpoint(xxlarge) {
      > .row {
        &:before {
          left: 36%;
        }
      }
    }
  }

  > section {
    padding: 50px 0;
  
    @include breakpoint(large) {
      padding: 50px 0;

      &.has-big-padding {
        padding: 150px 0;
      }
    }

    &.s-intro {
      margin-top: -500px;
      padding-top: 500px;

      @include breakpoint(large) {
        padding-top: calc(500px + 60px);
      }

      @include breakpoint(xlarge) {
        padding-top: calc(500px + 100px);

      }
    }
  }
}


.theme-menu {
  &:before, &:after {
    margin-left: 8px;
    width: 1px;
    height: 24px;
    background-color: $header-border-color;
    content: "";
  }

  &::before {
    transform: translate(10px, 0);
  }
  &::after {
    transform: translate(10px, 0);
  }
}
.theme-switch {
    position: relative;
    border-radius: 11px;
    display: block;
    width: 40px;
    height: 22px;
    flex-shrink: 0;
    border: 1px solid var(--fg-color);
    background-color: var(--bg-color);
    transition: border-color .25s!important;
    pointer-events: auto;
    cursor: pointer;
}

.check {
    position: absolute;
    top: 1px;
    left: 1px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background-color:color-mix(in srgb, $body-font-color, #ffffff 30%);
    box-shadow: var(--vp-shadow-1);
    border: 1px solid var(--fg-color);
}

.vpi-sun {
    --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3Cpath d='M12 2v2M12 20v2M4.93 4.93l1.41 1.41M17.66 17.66l1.41 1.41M2 12h2M20 12h2M6.34 17.66l-1.41 1.41M19.07 4.93l-1.41 1.41'/%3E%3C/svg%3E")
}

.vpi-moon {
    --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z'/%3E%3C/svg%3E")
}

.icon {
  .sun, .moon {
    mask: var(--icon) no-repeat;
    position: absolute;
    top: 2px;
    left: 2px;
    width: 12px;
    height: 12px;
    color: var(--fg-color);
    background-color: var(--bg-color);
  }
  position: relative;
  display: block;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  overflow: hidden;
}
.moon {
  opacity: 0
}
.sun {
  opacity: 1
}
.has-dark-bg .moon {
    opacity: 1
}
.has-dark-bg .sun {
    opacity: 0
}

.has-dark-bg .theme-switch .check {
    transform: translate(18px)
}
